// 占位符%placeholder，通过@extend引用，for example: @extend %clearfix

// 清除浮动
%clearfix {
&:after {
    content: "";
    display: table;
    clear: both;
}
}

//定位上下居中
%ct {  
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

//定位左右居中
%cl {  
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

//定位上下左右居中
%ca {  
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50% ,-50%);
}

// 单行超出省略号 
%ellipsis{
    overflow: hidden;
    text-overflow:ellipsis;
    white-space: nowrap;
}

// 禁止选取文本
%noselect{
    user-select: none;
    -webkit-user-select: none;
}

// ios回弹滚动
%scroll{
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

// css动画 GPU加速 消除动画闪屏
%animate{
    -webkit-transform: translate3d(0, 0, 0);
    -moz-transform: translate3d(0, 0, 0);
    -ms-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    -ms-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000;
    -moz-perspective: 1000;
    -ms-perspective: 1000;
    perspective: 1000;
}


// 混合宏@mixin，通过@include引用，for example: @include lineclamp(3)

// 多行超出省略号
@mixin lineclamp($num) {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: $num;
    overflow: hidden;
}

// 主题混合宏
@mixin theme-dark { 
    @if $brand == 'theme-dark' { 
        @content; 
    } 
} 
@mixin theme-dark { 
    @if $brand == 'theme-dark' { 
        @content; 
    } 
} 
@mixin theme-dark { 
    @if $brand == 'theme-dark' { 
        @content; 
    } 
} 
@mixin theme-dark { 
    @if $brand == 'theme-dark' { 
        @content; 
    } 
}
